<?php

require_once dirname(__FILE__).'/../lib/pacienteGeneratorConfiguration.class.php';
require_once dirname(__FILE__).'/../lib/pacienteGeneratorHelper.class.php';

/**
 * paciente actions.
 *
 * @package    asindo
 * @subpackage paciente
 * @author     Ignacio Calvo
 * @version    SVN: $Id: actions.class.php 12474 2008-10-31 10:41:27Z fabien $
 */
class pacienteActions extends autoPacienteActions
{

    

    public function executeUpdate(sfWebRequest $request)
    {
        parent::executeUpdate($request);

        return;

        $this->forward404Unless($request->isMethod('post') || $request->isMethod('put'));
        $this->forward404Unless($this->paciente = Doctrine::getTable('Paciente')->find($request->getParameter('id')), sprintf('Objeto paciente no existe (%s).', $request->getParameter('id')));

        //get the submit value from the request, and split it into an array of command, id
        $submit = ($request->hasParameter('nueva_sociedad') ? $request->getParameter('nueva_sociedad') : '');

        if ($submit == '') {
          
        }
        switch ($submit[0])
        {
          case 'insert':
            $this->paciente['Sociedad'] = new Sociedad();
            break;
          case 'delete':
            $this->forward404Unless($book = Doctrine::getTable('Book')->find($submit[1]));
            $book->delete();
            break;
        }
        $this->form = new AuthorForm($author);

        $this->processForm($request, $this->form);

        $this->setTemplate('edit');
      }
}
